package com.creator.paas.repository;

import com.creator.paas.entity.Invoice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface InvoiceRepository extends JpaRepository<Invoice, Long> {
    // 根据发票号查询发票
    Optional<Invoice> findByNumber(String number);

    // 检查发票号是否已存在
    boolean existsByNumber(String number);
}
    